/* using UnityEngine;
 * using System.Collections;
 * 
 * public class inventory : MonoBehaviour {
 * 
 *     private Vector3 destPosition;
 *     public Texture2D[] inventoryTextures;
 *     public int selectedItem = -1;
 *     public Camera cam = null;
 * 
 *     private GameObject objectInHand;
 *     private GameObject[] inventoryObjects; 
 * 	
 * 	// Update is called once per frame
 * 	void Update () {
 *         if (Input.GetMouseButtonDown(0))
 *         {
 *             // convert the mouse click coordinate to the world space point
 *             Ray mouseRay = cam.ScreenPointToRay(Input.mousePosition);
 *             // record the start & end to perform linerar interpolation
 *             // this is where the player needs to go
 *             destPosition = mouseRay.origin;
 * 
 *             // perform a check to see wether we clicked on a NPC or object
 *             RaycastHit hit;
 *             if (Physics.Raycast(mouseRay, out hit))
 *             {
 *                 destPosition = hit.transform.position;
 *                 Debug.Log(hit.collider.gameObject.name);
 *                 PropObjectInfo myProp = hit.collider.gameObject.GetComponent<PropObjectInfo>();
 *                 if (myProp)
 *                 {
 *                     Debug.Log(myProp.propname);
 *                     myProp.gameObject.active = false;
 *                     objectInHand = myProp.gameObject; 
 * 
 *                 }
 *                 else
 *                 {
 *                     Debug.Log("not an prop");
 *                 }
 *             }
 *         }
 * 	}
 * 
 * 
 *     void OnGUI()
 *     {
 *         selectedItem = GUI.SelectionGrid(new Rect(0, 0, 250, 50), selectedItem, inventoryTextures, 5);
 *         if (selectedItem != -1)
 *         {
 *             Debug.Log("Player selected " + inventoryTextures[selectedItem].name);
 *             selectedItem = -1;
 *         }
 *         //// Constrain all drawing to be within a 800x600 pixel area centered on the screen.
 *         //GUI.BeginGroup(new Rect(Screen.width / 2 - 400, Screen.height / 2 - 300, 800, 600));
 * 
 * 
 * 
 * 
 *          if (objectInHand)
 *           {
 *               inventoryTextures[0] = (Texture2D)objectInHand.renderer.material.mainTexture;
 *               
 *                   //.renderer.material.mainTexture;
 *               //// Draw a box in the new coordinate space defined by the BeginGroup.
 *               //// Notice how (0,0) has now been moved on-screen
 *               //if (GUI.Button(new Rect(0, 0, 100, 100), objectInHand.renderer.material.mainTexture))
 *                
 *                   // remove the button
 *                   //objectInHand.active = true;
 *                   
 *                
 *           } 
 *         //// We need to match all BeginGroup calls with an EndGroup
 *         //GUI.EndGroup();
 *     } 
 * }
 */
